/*
  SOLID - Interference Detection Library
  Copyright (C) 1997 Gino van den Bergen

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Please send remarks, questions and bug reports to gino@win.tue.nl,
  or write to:
                  Gino van den Bergen
		  Department of Mathematics and Computing Science
		  Eindhoven University of Technology
		  P.O. Box 513, 5600 MB Eindhoven, The Netherlands
*/

#include "Detector.h"
#include <SOLID/solid.h>

// Shape definition

void dtNewShape(const char *name) { Detector::newShape(name); }
void dtEndShape() { Detector::endShape(); }
void dtDeleteShape(const char *name) { Detector::deleteShape(name); }

void dtVertex(DtScalar x, DtScalar y, DtScalar z) { 
  Detector::vertex(x, y, z); 
}

void dtNewPolygon() { Detector::newPolygon(); }
void dtEndPolygon() { Detector::endPolygon(); }



// Object instantiation

void dtNewObject(DtObjectRef ref, const char *name) { 
  Detector::newObject(ref, name); 
}

void dtDeleteObject(DtObjectRef ref) { Detector::deleteObject(ref); }
void dtSelectObject(DtObjectRef ref) { Detector::selectObject(ref); }

void dtPosition(DtScalar x, DtScalar y, DtScalar z) {
  Detector::position(x, y, z);
}

void dtOrientation(DtScalar x, DtScalar y, DtScalar z, DtScalar w) { 
  Detector::orientation(x, y, z, w);
}

void dtOpenGLMatrixf(const float *m) { Detector::openGLMatrix(m); }
void dtOpenGLMatrixd(const double *m) { Detector::openGLMatrix(m); }

// Response

void dtSetDefaultResponse(DtResponse response, DtResponseType type,
			  DtPointer client_data) {
  Detector::setDefaultResponse(response, type, client_data);
}

void dtClearDefaultResponse() { Detector::clearDefaultResponse(); }

void dtSetObjectResponse(DtObjectRef ref, DtResponse response, 
			 DtResponseType type, DtPointer client_data) {
  Detector::setObjectResponse(ref, response, type, client_data);
}

void dtClearObjectResponse(DtObjectRef obj) { 
  Detector::clearObjectResponse(obj); 
}

void dtResetObjectResponse(DtObjectRef obj) {
  Detector::resetObjectResponse(obj);
}

void dtSetPairResponse(DtObjectRef obj1, DtObjectRef obj2, 
		       DtResponse response, DtResponseType type, 
		       DtPointer client_data) {
  Detector::setPairResponse(obj1, obj2, response, type, client_data);
}

void dtClearPairResponse(DtObjectRef obj1, DtObjectRef obj2) {
  Detector::clearPairResponse(obj1, obj2);
}

void dtResetPairResponse(DtObjectRef obj1, DtObjectRef obj2) {
  Detector::resetPairResponse(obj1, obj2);
}



// Test

int dtTest() { return Detector::test(); }




void dtEnableNBody()  { Detector::enableNBody(); }
void dtDisableNBody() { Detector::disableNBody(); }

void dtFixedSizeBBox(){ Detector::fixedSizeBBox(); }
void dtDynamicBBox()  { Detector::dynamicBBox(); }
